package gorm1

import "gorm.io/gen"

type Querier interface {
	// SELECT * FROM @@table WHERE username = @username limit 1
	FilterWithUsername(username string) (gen.T, error)

	// SELECT * FROM @@table
	//  {{if user != nil}}
	//      {{if user.ID > 0}}
	//          WHERE id=@user.ID
	//      {{else if user.Username != ""}}
	//          WHERE username=@user.Username
	//      {{end}}
	//  {{end}}
	// limit 1
	FilterWithUser(user *gen.T) (*gen.T, error)
}
